﻿<%@ Page Title="" Language="C#" MasterPageFile="../Shared/site.Master" Inherits="System.Web.Mvc.ViewPage<Longtop.Web.WebSite.Admin.Roles.PermissionsModel>" %>

<%@ Import Namespace="Longtop.Web.WebSite.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <table width="90%" id="list">
        <tr>
            <th>
                编号
            </th>
            <th>
                权限名称
            </th>
            <th>
                权限描述
            </th>
            <th>
            </th>
        </tr>
        <% foreach (var item in Model.PagedList) { %>
        <tr>
            <td>
                <%= item.Id %>
            </td>
            <td>
                <%=item.PermissionName%>
            </td>
            <td>
                <%=item.GetText()%>
            </td>
            <td>
                <%= Html.ActionLink("编辑", "Edit", new {  id=item.Id}) %>
                <%--  |<%= Html.ActionLink("删除", "Delete", new {  id=item.CaseId}) %>--%>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
        <%--   <%if (Model.Lable.AllowCreateChild) { %>
        <%= Html.ActionLink(string.Format("浏览 [{0}] 的子类别", Model.Lable.Text), "index", new { controller = "labels", id = this.ViewContext.RouteData.Values["id"] })%>
        |
        <%} %>--%>
        <%= Html.ActionLink(string.Format("新增权限到 [{0}]",Model.Role.Rolename), "createpermission", new { id=this.ViewContext.RouteData.Values["id"]})%>
    </p>
    <div class="mike_mvc_pager">
        <%=Html.Pager(Model) %></div>
    <br />
    <br />

    <script type="text/javascript">
        $(function() {

            if (!$('#list img:first').is('img'))
                $('th:contains("缩略图")').remove().parent('tr').nextAll('tr td:eq(2)').remove();
        });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
